<template>
   <div class="goolist">
       <!-- 这里使用遍历是因为要遍历里面的三个对象，你可以根据vue追踪插件理解-->
       <!--  把遍历的值传给goodsItem -->
       <goods-list-item v-for="(item,index) in goods" :key="index" :goods-item="item" >
         
       </goods-list-item>
   </div>
</template>

<script>
import GoodsListItem from './GoodsListItem.vue'

export default {
  components: { GoodsListItem },
   props:{
       goods:{
           type:Array,
           default(){
               return []
           }
       }
   },
   created(){
       console.log(this.goods)

   }
}
</script>

<style scoped>
     .goolist{
         width:100%;
         display: flex;
         flex-wrap: wrap;
         justify-content: space-between;
         padding: 0 10px;
         box-sizing: border-box;
         background: #eee;
     }
    
</style>